package com.icms.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

public class SpringMvcInterceptor extends HandlerInterceptorAdapter {

	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
		System.out.println("Interceptor.....");
		
		HandlerMethod hm = (HandlerMethod)handler ;
		System.out.println(hm.getBean().getClass().getName()+"."+hm.getMethod().getName());
		System.out.println("=====================");
		
		return super.preHandle(request, response, handler);
	}
	
}
